package java_test;

public class StringReplaceEmp {
    public static void main(String[] args) {
        String  str = "Hello Yonyou";
        System.out.println(str.replace('H','W' ) );
        System.out.println(str.replace("Y","666"));
        System.out.println(str.replaceFirst("l", "8889"));
        System.out.println( str.replaceAll("ou", "778"));
//        System.out.println( str.replace( 'H','W' ) );
//        System.out.println( str.replaceFirst("He", "Wa") );
//        System.out.println( str.replaceAll("He", "Ha") );
    }
}
